package net.huashitong.supervision.task.dao;

import com.sirdc.modules.core.dao.GenericQuery;
import com.sirdc.modules.core.dao.StringDao;
import net.huashitong.supervision.task.entity.MajorBack;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: ling
 * Date: 2020/1/16
 * Time: 14:44
 * To change this template use File | Settings | File Templates.
 * Description:
 */
@Repository
public class MajorBackDao extends StringDao<MajorBack> {
    public List<MajorBack> getByTaskMainId(String sysId) {
        GenericQuery obj = createQuery("obj");
        obj.append(" and taskMainId = :taskMainId").setParam("taskMainId", sysId);
        obj.append(" order by  obj.sysId desc");
        return obj.listResult();
    }
}
